package com.shensi.api.admin.client.station;

import com.shensi.api.admin.client.fallback.monitor.SysLogininforClientFallBack;
import com.shensi.api.admin.domian.station.dto.StationRechargeDto;
import com.shensi.api.admin.domian.station.dto.SyncUserDto;
import com.shensi.api.admin.domian.station.vo.StationRechargeVo;
import com.shensi.common.core.annotation.Log;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.enums.BusinessType;
import com.shensi.common.core.page.TableDataInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = SysLogininforClientFallBack.class)
@Component
public interface StationRechargeClient {

    /**
     * 查询油站充值列表
     */
    @GetMapping("/station/recharge/list")
    public TableDataInfo list(StationRechargeVo stationRecharge);

    /**
     * 导出油站充值列表
     */
    @GetMapping("/station/recharge/export")
    public AjaxResult export(StationRechargeVo stationRecharge) ;

    /**
     * 油站充值余额
     */
    @GetMapping(value = "/station/recharge/{stationId}")
    public AjaxResult getInfo(@PathVariable("stationId") Long stationId);

    /**
     * 新增油站充值
     */
    @PostMapping("/station/recharge")
    public AjaxResult add(@RequestBody StationRechargeDto stationRecharge);

    /**
     * 修改油站充值
     */
    @PutMapping("/station/recharge")
    public AjaxResult edit(@RequestBody StationRechargeDto stationRecharge);

    /**
     * 删除油站充值
     */
    @DeleteMapping("/station/recharge/{rechargeIds}")
    public AjaxResult remove(@PathVariable("rechargeIds") Long[] rechargeIds);

}
